package com.yunpeng.aidevice.dao.mapper.relation;


import com.yunpeng.aidevice.dao.mapper.IRelationMapper;
import com.yunpeng.aidevice.dao.model.relation.DeviceRelationOrganizationDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 设备绑定部门 Mapper 接口
 * </p>
 *
 * @author hemw
 * @since 2020-04-26
 */
@Mapper
public interface DeviceRelationOrganizationMapper extends IRelationMapper<DeviceRelationOrganizationDO> {

    /**
     * 根据组织机构删除对应设备绑定关系
     *
     * @param organizationCode
     */
    void deleteByOrganizationCode(@Param("organizationCode") String organizationCode);

    /**
     * 根据设备代码删除对应设备组织绑定关系
     *
     * @param deviceCode
     */
    void deleteByDeviceCode(@Param("deviceCode") String deviceCode);


    /**
     * 批量新增设备绑定组织信息
     *
     * @param deviceRelationOrganizationDOList
     */
    void batchAdd(@Param(value = "dos") List<DeviceRelationOrganizationDO> deviceRelationOrganizationDOList);
}
